<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        var a = new Promise(function (resolve, reject) {
            reject(1);
        });
        a.then(function () {

        }, function (p) {

            throw "then";
        }).catch(function (p2) {
            console.log(p2);
        });
    </script>
</body>
</html>